<template>
  <!-- $attrs:接收所有的非props属性
          用法：  :属性名="$attrs.属性"   v-bind="$attrs"
       $listeners:接收所有组件标签上绑定的方法
          用法：  @click="$listeners.方法名"  v-on="$listeners"
   -->
  <div>
    <HmAttrs
      @xxx="xxx"
      @xxx2="xxx2"
      @xxx3="xxx3"
      @click="attrsClick"
      @dblclick="attrsClick2"
      type="primary"
      src="https://v2.cn.vuejs.org/images/logo.svg"
      num="1"
    ></HmAttrs>
  </div>
</template>
<script>
import HmAttrs from './components/HmAttrs.vue'
export default {
  components: {
    HmAttrs
  },
  methods: {
    xxx () {
      console.log('xxx')
    },
    xxx2 () {
      console.log('xxx2')
    },
    xxx3 () {
      console.log('xxx3')
    },
    attrsClick () {
      console.log('attrsClick')
    },
    attrsClick2 () {
      console.log('attrsClick2')
    }
  }
}
</script>
<style></style>
